home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Jun 90 / MacApp.Tech$ 6⁄29⁄90 / 1513-TTEView bug-Jun90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.9 KB  |  56 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  NOVELL.MAC   to NOVELL.ENG
  2.  
  3. Item    4423130                         29-June-90        10:32PDT
  4.  
  5. From:   AUST0134                        Jam Software Sydney,IVR
  6.  
  7. To:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    TTEView bug
  10.  
  11. Dear MacAppers,
  12.  
  13. I recently found this bug in TTEView (ß9).  I have a TTEView, fSTyleType =
  14. kWithStyle, Inset(4,4,4,4).  If I perform SetOneStyle with a change which
  15. increases the vertical height of the text, either because it causes a wrap or
  16. because I am increase the point size, TTEView will not update a 4 pixel high
  17. horizontal strip near the bottom the TTEView.
  18.  
  19. Looking in the "bugs in ß9" document, I found
  20. BRC No: 31550
  21. -------------
  22. After wraparound in a TEView with non-zero bottom inset, only part
  23. of the second line is displayed.
  24. After mousing through the code a bit it seems that the problem is that Resize
  25. (which is called from AdjustSize from SynchView from SetOneStyle) does an
  26. InvalRgn of the difference between the new, larger TTEView extent and the old
  27. one.  Unfortunately, with a non-zero bottom inset, the area between the bottom
  28. of the TTEView and the bottom of the TEHandle itself (which is blank space) is
  29. not included in this InvalRgn.  Even more some parts of the newly enlarged
  30. characters should be drawn over this area.
  31.  
  32. Looking at 2.0final, Resize has changed a bit, but the algorithm seems
  33. essentially the same, which means the bug probably remains.  (Verification,
  34. please?)
  35.  
  36. One solution is to OVERRIDE Resize, and allowing for the bottom inset before
  37. doing the resize:
  38.  
  39. PROCEDURE TMyTEView.Resize(width, height: VCoordinate; invalidate: BOOLEAN);
  40. OVERRIDE;
  41. VAR
  42.    oldSize:VPoint;
  43. BEGIN
  44.    oldSize := fSize;
  45.    IF (fSize.h <> width) | (fSize.v <> height) THEN BEGIN
  46.    fSize.v := fSize.v - fInset.bottom;
  47.    INHERITED Resize(width, height, invalidate);
  48.    fSize := oldSize;
  49.    END
  50. END;
  51.  
  52. Tseung Cheung
  53. JAM Software Pty Ltd
  54. ALink AUST0134
  55.  
  56.